package com.swak.frame.hystrix.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.swak.frame.controller.BaseController;
import com.swak.frame.hystrix.stream.HystrixMetricsStream;

@Controller
public class HystrixMetricsStreamController extends BaseController{

	@Autowired
	private HystrixMetricsStream hystrixMetricsStream;
	
	
	@RequestMapping(path="/hystrix.stream")
	public void hystrixStream(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		hystrixMetricsStream.doGet(request, response);
	}
}
